package com.weiadmin.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weiadmin.common.PageParam;
import com.weiadmin.model.system.MemberModel;

public interface MemberDao extends BaseMapper<MemberModel> {
    default Page<MemberModel> getList(PageParam pageParam){

        Page<MemberModel> pager = new Page<>(pageParam.getPage(), pageParam.getLimit());
        QueryWrapper<MemberModel> queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByDesc("id");
        return selectPage(pager, queryWrapper);
    }
}
